#ifndef _protocol_H_
#define _protocol_H_
#include "stdint.h"
#include "stdbool.h"
#include "protocol_config_driver.h"

typedef enum
{
    eCommunicationMode_CAN = 0,
    eCommunicationMode_UART,
    eCommunicationMode_Num
}Protocol_CommunicationMode_EnumDef;//设备通信模式

extern uint8_t Protocol_FrameSendBuffer0[dFrame_LengthMax];

int32_t Protocol_Receive(Protocol_CommunicationMode_EnumDef mode,bool interrupt,uint8_t *buf,uint32_t len);
int32_t Protocol_Transfer(bool interrupt,uint8_t *buf,uint32_t len);
int32_t Protocol_DataTransmit(bool interrupt,uint8_t *buf,uint32_t len);
void Protocol_FrameAnalysis(uint8_t *frame_address,uint32_t frame_len,uint8_t *data_address,uint32_t data_len);

#endif
